<!DOCTYPE html>
<html lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><?=$title ?></title>
    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="shortcut icon" href="/media/images/frontend/favicon.png" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="/media/css/frontend/style.css" media="all">
    <script src="/media/js/jquery-1.7.2.min.js"></script>
    
    <script type="text/javascript" src="/media/fancybox/jquery.fancybox.js?v=2.1.5"></script>
    <link rel="stylesheet" type="text/css" href="/media/fancybox/jquery.fancybox.css?v=2.1.5" media="screen" />
    
    <script type="text/javascript">
        function set_data_for_send_contacts_modal(supplier_id, good_id) {
            $('#send-contacts-modal input[name=supplier_id]').val(supplier_id);
            $('#send-contacts-modal input[name=good_id]').val(good_id);        
        }
        
        function update_supplier_rank(supplier_id, rank)
        {
            $.post('/index/supplier/update_supplier_rank_ajax', {supplier_id: supplier_id, rank: rank}, function (data) {
                if (data.success) {
                    // ok   
                }        
            }, 'json');
        }
        
        function update_good_rank(good_id, rank)
        {
            $.post('/index/supplier/update_good_rank_ajax', {good_id: good_id, rank: rank}, function (data) {
                if (data.success) {
                    // ok   
                }        
            }, 'json');
        }
    
        $(document).ready(function() {
            $('.send-contacts-modal').fancybox().open();
        });
        
    </script>
</head>
<body>
<div class="container">
        <div class="span-24 last">
            <div class="logo">
                <a href="/" title="На главную"><img src="/media/images/frontend/logo.png" alt="OptZilla" ></a>
                
            </div>
            
            <div class="userbox">    
                <div class="user_menu">
                    <? /*<a href="http://optlist.ru/registration/?next=/" class="link_ico add_ico">Зарегистрироваться</a><br>
                    <a href="http://optlist.ru/login/?next=/" class="link_ico user_ico">Вход для зарегистрированных</a> */ ?>
                </div>
            </div>
        </div>
</div>
<div class="clear"></div>
<header>
    <div class="top_menu_outer">
        <div class="container">
            <div class="top_menu">
                <div class="span-24 last">
                    <ul>
                        <li class="active"><a href="/">Главная</a></li>
                        <li><a href="#">Поиск</a></li>
                        <li><a href="#">Товары</a></li>
                        <li><a href="#">Новости</a></li>
                        <li><a href="#">О сайте</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>

    <div class="clear"></div>
</header>


<div class="container">

    <!-- mainbody -->
    <div class="span-24 last">       
        <div class="main_content">

            <?=$content ?>

            <div class="clear"></div>
        </div>
    </div>

    <!-- footer -->
    <footer>
        <div class="span-24 last">

            <hr>

            <div class="span-11 append-1">
                <p class="small">
                    © 2015 <a href="/" class="blink">OptZilla.com</a> — поиск поставщиков.<br> Каталог оптовых фирм, где купить оптом.<br>
                </p>

            </div>
        
            <div class="span-5 small">
                <? /*<p>Поставщиков в базе:&nbsp;23819<br> Магазинов:&nbsp;125005</p> */ ?>
            </div>
            <div class="span-7 last">
                <div class="right blink">
                    <noindex>
                        <!--LiveInternet logo-->
                    </noindex>
                </div>
            </div>
        </div>
    </footer>
</div>

<div id="send-contacts-modal" style="display:none; width:360px; overflow: hidden;">
    <h2 style="margin-top: 10px;">Отправьте контакты поставщику</h2>

    <form action="/supplier/sendcontacts" method="post">
        <input type="hidden" name="supplier_id" value="0" />
        <input type="hidden" name="good_id" value="0" />
        
        <div class="narrow">
            <label for="id_phone" class="large">Телефон</label><br>
            <input id="id_phone" type="text" class="long" name="phone" maxlength="255" <?php if (isset($_COOKIE['phone']) && $_COOKIE['phone']): ?>value="<?=$_COOKIE['phone'] ?>"<?php endif; ?> placeholder="8-912-234-56-78" required>
        </div>
        
        <div class="narrow">
            <label for="id_email" class="large">Email</label><br>
            <input id="id_email" type="text" class="long" name="email" maxlength="255" <?php if (isset($_COOKIE['email']) && $_COOKIE['email']): ?>value="<?=$_COOKIE['email'] ?>"<?php endif; ?> placeholder="email@domain.com">
        </div>
        
        <div class="narrow">
            <label for="id_text" class="large">Сообщение</label><br>
            <textarea id="id_text" class="long" name="text" style="width: 300px; height: 100px; padding: 5px;"><?php if (isset($_COOKIE['text']) && $_COOKIE['text']): ?><?=unserialize($_COOKIE['text']) ?><?php endif; ?></textarea>
        </div>

        <button type="submit" id="id_submit" class="wide_button">Отправить</button>
    </form>
</div>

<?php /*<!-- BEGIN JIVOSITE CODE {literal} -->
<script type='text/javascript'>
(function(){ var widget_id = 'hS2kl2QBVl';
var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//code.jivosite.com/script/widget/'+widget_id; var ss = document.getElementsByTagName('script')[0]; ss.parentNode.insertBefore(s, ss);})();</script>
<!-- {/literal} END JIVOSITE CODE -->   */ ?>

<script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 ga('create', 'UA-59748636-1', 'auto');
 ga('send', 'pageview');

</script>

<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
    (w[c] = w[c] || []).push(function() {
        try {
            w.yaCounter28452126 = new Ya.Metrika({id:28452126,
                    webvisor:true,
                    clickmap:true,
                    trackLinks:true,
                    accurateTrackBounce:true});
        } catch(e) { }
    });

    var n = d.getElementsByTagName("script")[0],
        s = d.createElement("script"),
        f = function () { n.parentNode.insertBefore(s, n); };
    s.type = "text/javascript";
    s.async = true;
    s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

    if (w.opera == "[object Opera]") {
        d.addEventListener("DOMContentLoaded", f, false);
    } else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/28452126" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->

</body>
</html>